<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('调查审核')" />
    </head>
    <style type="text/css">
    </style>
    <body class="febs-container" id="febs-accidentReportSurveyAudit">
        <div class="febs-body layui-fluid" lay-title="调查审核">
            <div class="febs-body-search">
                <form class="layui-form layui-table-form" lay-filter="accidentReportSurvey-table-form" id="accidentReportSurvey-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                            <div class="layui-inline" id="post-tenant" th:if="${hasHeadCompanyRole }">
                                <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                <div class="layui-input-inline" style="width:240px;">
                                    <select name="tenantSelect" id="tenantSelect" lay-search="" >
                                        <option th:each="item:${tenantList }"
                                                th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                th:selected="${currentTenantId ==item.tenantId}">
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label layui-form-label-sm">事故编号</label>
                                <div class="layui-input-inline" >
                                    <input type="text" name="accidentNo" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label layui-form-label-sm">事故标题</label>
                                <div class="layui-input-inline" >
                                    <input type="text" name="accidentTitle" autocomplete="off" class="layui-input">
                                </div>
                            </div>


                            <div class="layui-inline">
                                <label class="layui-form-label">发生时间</label>
                                <div class="layui-input-inline" id="laydate-range">
                                    <input type="text" name="startDate" autocomplete="off" id="start-date" lay-verify="date"
                                           class="layui-input" placeholder="开始日期">
                                </div>
                                <div class="layui-form-mid">-</div>
                                <div class="layui-input-inline">
                                    <input type="text" name="endDate" autocomplete="off" id="end-date" lay-verify="date"
                                           class="layui-input" placeholder="结束日期">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label layui-form-label-sm">事故类型</label>
                                <div class="layui-input-inline" style="width: 240px;">
                                    <select name="accidentType" id="accidentType" lay-search="" >
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label layui-form-label-sm">事故等级</label>
                                <div class="layui-input-inline" >
                                    <select name="accidentLevel" id="accidentLevel" lay-search="" >
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">责任部门</label>
                                <div class="layui-input-inline" >
                                    <select name="obligationDeptId" lay-filter="leaderDeptSelect" id="leaderDeptSelect">
                                        <option value="">请选择</option>
                                        <option th:each="dept:${deptList}" th:value="${dept.deptId}"
                                                th:text="${dept.deptName}"></option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">责任人</label>
                                <div class="layui-input-inline">
                                    <select name="obligationUserId" lay-filter="leaderUserSelect" id="leaderUserSelect">
                                    </select>
                                </div>
                            </div>
<!--                            <div class="layui-inline">-->
<!--                                <label class="layui-form-label layui-form-label-sm">调查状态</label>-->
<!--                                <div class="layui-input-inline" >-->
<!--                                    <select name="surveyStatus" id="surveyStatus" lay-search="" >-->
<!--                                        <option value="">请选择</option>-->
<!--                                        <option value="1">待指派</option>-->
<!--                                        <option value="2">待调查</option>-->
<!--                                        <option value="3">进行中</option>-->
<!--                                        <option value="4">待审核</option>-->
<!--                                        <option value="5">审核退回</option>-->
<!--                                        <option value="5">完成</option>-->
<!--                                    </select>-->
<!--                                </div>-->
<!--                            </div>-->
                            <div class="layui-inline">
                                <div id="query" class="layui-btn">
                                    <em class="layui-icon">&#xe615;</em> 查询
                                </div>
                            </div>

                        </div>
                        </div>
                    </div>
                </form>
            </div>

            <div class="febs-table-full">
                <table lay-filter="accidentReportSurveyAuditTable" lay-data="{id: 'accidentReportSurveyAuditTable'}"></table>
            </div>

        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="accidentReportSurvey-option">
            <span shiro:lacksPermission="accidentReport:surveyAudit">
            <span class="layui-badge-dot febs-bg-orange"></span> 无权限
            </span>
<!--            accident_report  survey_status(调查状态): 1:待调查指派 2：已分配待调查 3：进行中  4：调查待审核 5：调查审核退回 6：调查完成-->
            {{# if(d.surveyStatus=='4'){  }}
                <button type="button" lay-event="survey-audit" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-orange" shiro:hasPermission="accidentReport:surveyAudit">
                    <em class="layui-icon layui-icon-audit"></em>调查审核
                </button>
            {{# } else {  }}
                - -
            {{# } }}

        </script>
        <script data-th-inline="javascript" >
            tenantId = [[${tenantId}]],
            hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
            accidentTypeList = [[${accidentTypeList}]];
            accidentLevelList = [[${accidentLevelList}]];
            jobOperationList = [[${jobOperationList}]];
        </script>
        <script th:src="@{/febs/js/accidentReport/accidentReportSurveyAuditList.js(v=1)}"></script>
    </body>
</html>